*********************************************************************************
/* EITC Event Study	*/
*********************************************************************************

* File paths
local datapath "${mvpf_audits}/data/cleaned" 
local datafolder "${mvpf_audits}/data/outside" 
local graphpath "${graphpath}" 

* Version of fig to produce 
global version  ${version} // paper or slides

* Other formatting
if "${version}" == "slides" {
	global title "title(" ", size(vhuge))"
	global img wmf
	graph set window fontface "Arial"
	global title "title(" ", size(vhuge))"
	global axis_size "" //xsize(6.5) ysize(4)" // makes figure wider
}

else if "${version}" == "paper" {
	global title "title("")"
	global img pdf
	graph set window fontface "LMRoman10-Regular"
	global title " "
	global axis_size " " // makes figure wider
}

use "${mvpf_audits}/data/figures_rep/ap19.dta", clear

/*------------------------------------------------------------------------------
Plot event studies by year
------------------------------------------------------------------------------*/

	twoway  (rspike coeff_eitc0_h coeff_eitc0_l event2, lc(gs9) lw(thin)) ///
			(scatter coeff_eitc0 event2, mc(gs9) msize(small) ms(T)) ///
			(line coeff_eitc0 event2, lc(gs9)) ///
			(rspike coeff_eitc1_h coeff_eitc1_l event, lc(gs4) lw(thin)) ///
			(scatter coeff_eitc1 event, mc(gs4) msize(small) ms(O)) ///
			(line coeff_eitc1 event, lc(gs4)) ///
			, ///
			xline(0.5, lw(vthin) lc(gs11)) ///
			yline(0, lw(vthin) lc(gs11)) ///
			xtitle("Year relative to tax year of audited return") ///
			ytitle("EITC Claims") ///
			xlabel(-14(2)14 , nogrid)  ///
			ylab(, nogrid format(%5.0fc))  ///
			legend(ring(0) pos(9) row(2) symxsize(*0.3) order(5 2) ///
			lab(5 "EITC Reduction") lab(2 "No EITC Reduction") ) ///
			${title} ${axis_size}	
graph export "`graphpath'/event_study_eitc_noref.wmf", as(wmf) replace

